package map;

import java.util.*;

public class Test {
    public static void main(String[] args) {
        HashMap<String, List<String>> map = new HashMap<>();

        List<String> cities1 = new ArrayList<>();
        Collections.addAll(cities1,"常州市", "启东市", "南京市", "无锡市", "南通市");
        map.put("江苏省", cities1);


        List<String> cities2 = new ArrayList<>();
        Collections.addAll(cities2,"鹤壁市", "安阳市", "郑州市", "洛阳市", "濮阳市");
        map.put("河南省", cities2);


        List<String> cities3 = new ArrayList<>();
        Collections.addAll(cities3,"武汉市", "孝感市", "十堰市", "昌邑市", "鄂州市");
        map.put("湖北省", cities3);

        System.out.println(map);

        List<String> cities = map.get("河南省");
        for (String city : cities) {
            System.out.println(city);
        }
            map.forEach((p, c) -> {
                    System.out.println(p + " -> " + c);
                    });
        }
    }

